<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic1">
  <title>gpbackup</title>
  <body>
    <p>Create a Greenplum Database backup for use with the <codeph>gprestore</codeph> utility. </p>
    <section>
      <title>Synopsis</title>
      <codeblock>gpbackup --dbname &lt;database_name>
   [--backup-dir &lt;directory>]
   [--compression-level &lt;level>]
   [--data-only]
   [--debug]
   [--exclude-schema &lt;schema_name> [--exclude-schema &lt;schema_name> ...]]
   [--exclude-table &lt;schema.table> [--exclude-table &lt;schema.table> ...]]
   [--exclude-schema-file &lt;file_name>]
   [--exclude-table-file &lt;file_name>]
   [--include-schema &lt;schema_name> [--include-schema &lt;schema_name> ...]]
   [--include-table &lt;schema.table> [--include-table &lt;schema.table> ...]]
   [--include-schema-file &lt;file_name>]
   [--include-table-file &lt;file_name>]
   [--incremental [--from-timestamp &lt;backup-timestamp>]]
   [--jobs &lt;int>]
   [--leaf-partition-data]
   [--metadata-only]
   [--no-compression]
   [--plugin-config &lt;config_file_location>]
   [--quiet]
   [--single-data-file]
   [--verbose]
   [--version]
   [--with-stats]
   [--without-globals]

gpbackup --help </codeblock>
    </section>
    <section>
      <title>Description</title>
      <p>The <codeph>gpbackup</codeph> utility backs up the contents of a database into a collection
        of metadata files and data files that can be used to restore the database at a later time
        using <codeph>gprestore</codeph>. When you back up a database, you can specify table level
        and schema level filter options to back up specific tables. For example, you can combine
        schema level and table level options to back up all the tables in a schema except for a
        single table. </p>
      <p>By default, <codeph>gpbackup</codeph> backs up objects in the specified database as well as
        global Greenplum Database system objects. Use <codeph>--without-globals</codeph> to omit
        global objects. <codeph>gprestore</codeph> does not restore global objects by default; use
          <codeph>--with-globals</codeph> to restore them. See <xref
          href="../../admin_guide/managing/backup-gpbackup.html#topic_x3s_lqj_tbb" format="html" scope="external">Objects Included in a Backup or Restore</xref> for additional
        information.</p>
      <p>For materialized views, data is not backed up, only the materialized view definition is
        backed up.</p>
      <p><codeph>gpbackup</codeph> stores the object metadata files and DDL files for a backup in
        the Greenplum Database master data directory by default. Greenplum Database segments use the
          <codeph>COPY ... ON SEGMENT</codeph> command to store their data for backed-up tables in
        compressed CSV data files, located in each segment's data directory. See <xref
          href="../../admin_guide/managing/backup-gpbackup.html#topic_xnj_b4c_tbb" format="html" scope="external">Understanding Backup Files</xref> for additional
        information.</p>
      <p>You can add the <codeph>--backup-dir</codeph> option to copy all backup files from the
        Greenplum Database master and segment hosts to an absolute path for later use. Additional
        options are provided to filter the backup set in order to include or exclude specific
        tables.</p>
      <p>You can create an incremental backup with the <xref href="#topic1/incremental"
          format="dita">--incremental</xref> option. Incremental backups are efficient when the
        total amount of data in append-optimized tables or table partitions that changed is small
        compared to the data has not changed. See <xref
          href="../../admin_guide/managing/backup-gpbackup-incremental.html" format="html"
          scope="external">Creating and Using Incremental Backups with gpbackup and gprestore</xref>
        for information about incremental backups. </p>
      <p>With the default <codeph>--jobs</codeph> option (1 job), each <codeph>gpbackup</codeph>
        operation uses a single transaction on the Greenplum Database master host. The <codeph>COPY
          ... ON SEGMENT</codeph> command performs the backup task in parallel on each segment host.
        The backup process acquires an <codeph>ACCESS SHARE</codeph> lock on each table that is
        backed up. During the table locking process, the database should be in a quiescent
        state.</p>
      <p>When a back up operation completes, <codeph>gpbackup</codeph> returns a status code. See
          <xref href="#topic1/return_codes" format="dita"/>. </p>
      <p>The <codeph>gpbackup</codeph> utility cannot be run while <codeph>gpexpand</codeph> is
        initializing new segments. Backups created before the expansion cannot be restored with
          <codeph>gprestore</codeph> after the cluster expansion is completed.</p>
      <p><codeph>gpbackup</codeph> can send status email notifications after a back up operation
        completes. You specify when the utility sends the mail and the email recipients in a
        configuration file. See <xref
          href="../../admin_guide/managing/backup-gpbackup.html#topic_qwd_d5d_tbb" format="html" scope="external">Configuring Email Notifications</xref>.</p>
      <note>This utility uses secure shell (SSH) connections between systems to perform its tasks.
        In large Greenplum Database deployments, cloud deployments, or deployments with a large
        number of segments per host, this utility may exceed the host's maximum threshold for
        unauthenticated connections. Consider updating the SSH <codeph>MaxStartups</codeph> and
          <codeph>MaxSessions</codeph> configuration parameters to increase this threshold. For more
        information about SSH configuration options, refer to the SSH documentation for your Linux
        distribution.</note>
    </section>
    <section>
      <title>Options</title>
      <parml>
        <plentry>
          <pt><b>--dbname</b>
            <varname>database_name</varname></pt>
          <pd>Required. Specifies the database to back up.</pd>
        </plentry>
        <plentry>
          <pt><b>--backup-dir</b>
            <varname>directory</varname></pt>
          <pd>Optional. Copies all required backup files (metadata files and data files) to the
            specified directory. You must specify <b><varname>directory</varname></b> as an absolute
            path (not relative). If you do not supply this option, metadata files are created on the
            Greenplum Database master host in the
              <filepath>$MASTER_DATA_DIRECTORY/backups/YYYYMMDD/YYYYMMDDhhmmss/</filepath>
            directory. Segment hosts create CSV data files in the
              <filepath>&lt;seg_dir>/backups/YYYYMMDD/YYYYMMDDhhmmss/</filepath> directory. When you
            specify a custom backup directory, files are copied to these paths in subdirectories of
            the backup directory.</pd>
          <pd>You cannot combine this option with the option <codeph>--plugin-config</codeph>.</pd>
        </plentry>
        <plentry>
          <pt><b>--compression-level</b>
            <varname>level</varname></pt>
          <pd>Optional. Specifies the gzip compression level (from 1 to 9) used to compress data
            files. The default is 1. Note that <codeph>gpbackup</codeph> uses compression by
            default.</pd>
        </plentry>
        <plentry>
          <pt><b>--data-only</b></pt>
          <pd>Optional. Backs up only the table data into CSV files, but does not backup metadata
            files needed to recreate the tables and other database objects.</pd>
        </plentry>
        <plentry>
          <pt><b>--debug</b></pt>
          <pd>Optional. Displays verbose debug messages during operation.</pd>
        </plentry>
        <plentry>
          <pt><b>--exclude-schema</b>
            <varname>schema_name</varname></pt>
          <pd>Optional. Specifies a database schema to exclude from the backup. You can specify this
            option multiple times to exclude multiple schemas. You cannot combine this option with
            the option <codeph>--include-schema</codeph>, <codeph>--include-schema-file</codeph>, or
            a table filtering option such as <codeph>--include-table</codeph>. </pd>
          <pd>See <xref href="../../admin_guide/managing/backup-gpbackup.html#topic_et4_b5d_tbb" format="html" scope="external">Filtering the Contents of a Backup or Restore</xref>
            for more information. </pd>
          <pd>See <xref href="../../admin_guide/managing/backup-gpbackup.html#topic_vh5_1hd_tbb" format="html" scope="external">Requirements and Limitations</xref>
            for limitations when leaf partitions of a partitioned table are in different schemas
            from the root partition.</pd>
        </plentry>
        <plentry>
          <pt><b>--exclude-schema-file</b>
            <varname>file_name</varname></pt>
          <pd>Optional. Specifies a text file containing a list of schemas to exclude from the
            backup. Each line in the text file must define a single schema. The file must not
            include trailing lines. If a schema name uses any character other than a lowercase
            letter, number, or an underscore character, then you must include that name in double
            quotes. You cannot combine this option with the option <codeph>--include-schema</codeph>
            or <codeph>--include-schema-file</codeph>, or a table filtering option such as
              <codeph>--include-table</codeph>. </pd>
          <pd>See <xref href="../../admin_guide/managing/backup-gpbackup.html#topic_et4_b5d_tbb" format="html" scope="external">Filtering the Contents of a Backup or Restore</xref>
            for more information. </pd>
          <pd>See <xref href="../../admin_guide/managing/backup-gpbackup.html#topic_vh5_1hd_tbb" format="html" scope="external">Requirements and Limitations</xref>
            for limitations when leaf partitions of a partitioned table are in different schemas
            from the root partition.</pd>
        </plentry>
        <plentry>
          <pt><b>--exclude-table</b>
            <varname>schema.table</varname></pt>
          <pd>Optional. Specifies a table to exclude from the backup. The table must be in the
            format <codeph>&lt;schema-name>.&lt;table-name></codeph>. If a table or schema name uses
            any character other than a lowercase letter, number, or an underscore character, then
            you must include that name in double quotes. You can specify this option multiple times.
            You cannot combine this option with the option <codeph>--exclude-schema</codeph>,
              <codeph>--exclude-schema-file</codeph>, or another a table filtering option such as
              <codeph>--include-table</codeph>. </pd>
          <pd>If you specify a leaf partition name, <codeph>gpbackup</codeph> ignores the partition
            names. The leaf partition is not excluded.</pd>
          <pd>See <xref href="../../admin_guide/managing/backup-gpbackup.html#topic_et4_b5d_tbb" format="html" scope="external">Filtering the Contents of a Backup or Restore</xref>
            for more information.</pd>
        </plentry>
        <plentry>
          <pt><b>--exclude-table-file</b>
            <varname>file_name</varname></pt>
          <pd>Optional. Specifies a text file containing a list of tables to exclude from the
            backup. Each line in the text file must define a single table using the format
              <codeph>&lt;schema-name>.&lt;table-name></codeph>. The file must not include trailing
            lines. If a table or schema name uses any character other than a lowercase letter,
            number, or an underscore character, then you must include that name in double quotes.
            You cannot combine this option with the option <codeph>--exclude-schema</codeph>,
              <codeph>--exclude-schema-file</codeph>, or another a table filtering option such as
              <codeph>--include-table</codeph>.  </pd>
          <pd>If you specify leaf partition names in a file that is used with
              <codeph>--exclude-table-file</codeph>, <codeph>gpbackup</codeph> ignores the partition
            names. The leaf partitions are not excluded.</pd>
          <pd>See <xref href="../../admin_guide/managing/backup-gpbackup.html#topic_et4_b5d_tbb" format="html" scope="external">Filtering the Contents of a Backup or Restore</xref>
            for more information.</pd>
        </plentry>
        <plentry>
          <pt><b>--include-schema</b>
            <varname>schema_name</varname></pt>
          <pd>Optional. Specifies a database schema to include in the backup. You can specify this
            option multiple times to include multiple schemas. If you specify this option, any
            schemas that are not included in subsequent <codeph>--include-schema</codeph> options
            are omitted from the backup set. You cannot combine this option with the options
              <codeph>--exclude-schema</codeph>, <codeph>--exclude-schema-file</codeph>,
              <codeph>--exclude-schema-file</codeph>, <codeph>--include-table</codeph>, or
              <codeph>--include-table-file</codeph>. See <xref
              href="../../admin_guide/managing/backup-gpbackup.html#topic_et4_b5d_tbb" format="html" scope="external">Filtering the Contents of a Backup or Restore</xref> for more
            information.</pd>
        </plentry>
        <plentry>
          <pt><b>--include-schema-file</b> &lt;file_name></pt>
          <pd>Optional. Specifies a text file containing a list of schemas to back up. Each line in
            the text file must define a single schema. The file must not include trailing lines. If
            a schema name uses any character other than a lowercase letter, number, or an underscore
            character, then you must include that name in double quotes. See <xref
              href="../../admin_guide/managing/backup-gpbackup.html#topic_et4_b5d_tbb" format="html" scope="external">Filtering the Contents of a Backup or Restore</xref> for more
            information.</pd>
        </plentry>
        <plentry>
          <pt><b>--include-table</b> &lt;schema.table></pt>
          <pd>Optional. Specifies a table to include in the backup. The table must be in the format
              <codeph>&lt;schema-name>.&lt;table-name></codeph>. For information on specifying
            special characters in schema and table names, see <xref
              href="http://docs-lena-gpbackup-globals.cfapps.io/backup-restore/1-18/utility_guide/ref/gpbackup.html#topic1__table_names"
              format="html" scope="external">Schema and Table Names</xref>.</pd>
          <pd>You can specify this option multiple times. You cannot combine this option with a
            schema filtering option such as <codeph>--include-schema</codeph>, or another table
            filtering option such as <codeph>--exclude-table-file</codeph>.</pd>
          <pd>You can also specify the qualified name of a sequence, a view, or a materialized view. </pd>
          <pd>If you specify this option, the utility does not automatically back up dependent
            objects. You must also explicitly specify dependent objects that are required. For
            example if you back up a view or a materialized view, you must also back up the tables
            that the view or materialized view uses. If you back up a table that uses a sequence,
            you must also back up the sequence.</pd>
          <pd>You can optionally specify a table leaf partition name in place of the table name, to
            include only specific leaf partitions in a backup with the
              <codeph>--leaf-partition-data</codeph> option. When a leaf partition is backed up, the
            leaf partition data is backed up along with the metadata for the partitioned table.</pd>
          <pd>See <xref href="../../admin_guide/managing/backup-gpbackup.html#topic_et4_b5d_tbb" format="html" scope="external">Filtering the Contents of a Backup or Restore</xref>
            for more information.</pd>
        </plentry>
        <plentry>
          <pt><b>--include-table-file</b>
            <varname>file_name</varname></pt>
          <pd>Optional. Specifies a text file containing a list of tables to include in the backup.
            Each line in the text file must define a single table using the format
              <codeph>&lt;schema-name>.&lt;table-name></codeph>. The file must not include trailing
            lines. For information on specifying special characters in schema and table names, see
              <xref href="#topic1/table_names" format="dita">Schema and Table Names</xref>. </pd>
          <pd>Any tables not listed in this file are omitted from the backup set. You cannot combine
            this option with a schema filtering option such as <codeph>--include-schema</codeph>, or
            another table filtering option such as <codeph>--exclude-table-file</codeph>.</pd>
          <pd>You can also specify the qualified name of a sequence, a view, or a materialized view. </pd>
          <pd>If you specify this option, the utility does not automatically back up dependent
            objects. You must also explicitly specify dependent objects that are required. For
            example if you back up a view or a materialized view, you must also specify the tables
            that the view or the materialized view uses. If you specify a table that uses a
            sequence, you must also specify the sequence.</pd>
          <pd>You can optionally specify a table leaf partition name in place of the table name, to
            include only specific leaf partitions in a backup with the
              <codeph>--leaf-partition-data</codeph> option. When a leaf partition is backed up, the
            leaf partition data is backed up along with the metadata for the partitioned table.</pd>
          <pd>See <xref href="../../admin_guide/managing/backup-gpbackup.html#topic_et4_b5d_tbb" format="html" scope="external">Filtering the Contents of a Backup or Restore</xref>
            for more information.</pd>
        </plentry>
        <plentry id="incremental">
          <pt><b>--incremental</b></pt>
          <pd>Specify this option to add an incremental backup to an incremental backup set. A
            backup set is a full backup and one or more incremental backups. The backups in the set
            must be created with a consistent set of backup options to ensure that the backup set
            can be used in a restore operation. </pd>
          <pd>By default, <codeph>gpbackup</codeph> attempts to find the most recent existing backup
            with a consistent set of options. If the backup is a full backup, the utility creates a
            backup set. If the backup is an incremental backup, the utility adds the backup to the
            existing backup set. The incremental backup is added as the latest backup in the backup
            set. You can specify <codeph>--from-timestamp</codeph> to override the default
            behavior.</pd>
          <pd>
            <parml>
              <plentry>
                <pt><b>--from-timestamp</b>
                  <varname>backup-timestamp</varname></pt>
                <pd>Optional. Specifies the timestamp of a backup. The specified backup must have
                  backup options that are consistent with the incremental backup that is being
                  created. If the specified backup is a full backup, the utility creates a backup
                  set. If the specified backup is an incremental backup, the utility adds the
                  incremental backup to the existing backup set.</pd>
              </plentry>
            </parml>
          </pd>
          <pd>You must specify <codeph>--leaf-partition-data</codeph> with this option. You cannot
            combine this option with <codeph>--data-only</codeph> or
              <codeph>--metadata-only</codeph>.</pd>
          <pd>A backup is not created and the utility returns an error if the backup cannot add the
            backup to an existing incremental backup set or cannot use the backup to create a backup
            set.</pd>
          <pd>For information about creating and using incremental backups, see <xref
              href="../../admin_guide/managing/backup-gpbackup-incremental.html" format="html" scope="external">backup-gpbackup-incremental.html</xref>.</pd>
        </plentry>
        <plentry>
          <pt><b>--jobs</b>
            <varname>int</varname></pt>
          <pd>Optional. Specifies the number of jobs to run in parallel when backing up tables. By
            default, <codeph>gpbackup</codeph> uses 1 job (database connection). Increasing this
            number can improve the speed of backing up data. When running multiple jobs, each job
            backs up tables in a separate transaction. For example, if you specify <codeph>--jobs
              2</codeph>, the utility creates two processes, each process starts a single
            transaction, and the utility backs up the tables in parallel using the two processes.
              <note type="important">
              <p>If you specify a value higher than 1, the database must be in a quiescent state at
                the very beginning while the utility creates the individual connections, initializes
                their transaction snapshots, and acquires a lock on the tables that are being backed
                up. If concurrent database operations are being performed on tables that are being
                backed up during the transaction snapshot initialization and table locking step,
                consistency between tables that are backed up in different parallel workers cannot be
                guaranteed.</p>
            </note></pd>
          <pd>You cannot use this option in combination with the options
              <codeph>--metadata-only</codeph>, <codeph>--single-data-file</codeph>, or
              <codeph>--plugin-config</codeph>.</pd>
          <pd><b>Note: </b> When using the <codeph>--jobs</codeph> flag, there is a potential
            deadlock scenario to generate a <codeph>WARNING</codeph> message in the log files.
            During the metadata portion of the backup, the main worker process gathers Access Share
            locks on all the tables in the backup set.  During the data portion of the backup, based
            on the value of the <codeph>--jobs</codeph> flag, additional workers are created that
            attempt to take additional Access Share locks on the tables they back up. Between the
            metadata backup and the data backup, if a third party process (operations like
              <codeph>TRUNCATE</codeph>, <codeph>DROP</codeph>, <codeph>ALTER</codeph>) attempts to
            access the same tables and obtain an Exclusive lock, the worker thread identifies the
            potential deadlock, terminates its process, and hands off the table backup
            responsibilities to the main worker (that already has an Access Share lock on that
            particular table). A warning message is logged, similar to: <codeph>[WARNING]:-Worker 5
              could not acquire AccessShareLock for table public.foo. Terminating worker and
              deferring table to main worker thread.</codeph></pd>
        </plentry>
        <plentry id="backup_leaf_part">
          <pt><b>--leaf-partition-data</b></pt>
          <pd>Optional. For partitioned tables, creates one data file per leaf partition instead of
            one data file for the entire table (the default). Using this option also enables you to
            specify individual leaf partitions to include in or exclude from a backup, with the
              <codeph>--include-table</codeph>, <codeph>--include-table-file</codeph>,
              <codeph>--exclude-table</codeph>, and <codeph>--exclude-table-file</codeph>
            options.</pd>
        </plentry>
        <plentry>
          <pt><b>--metadata-only</b></pt>
          <pd>Optional. Creates only the metadata files (DDL) needed to recreate the database
            objects, but does not back up the actual table data.</pd>
        </plentry>
        <plentry>
          <pt><b>--no-compression</b></pt>
          <pd>Optional. Do not compress the table data CSV files.</pd>
        </plentry>
        <plentry>
          <pt><b>--plugin-config</b>
            <varname>config-file_location</varname></pt>
          <pd>Specify the location of the <codeph>gpbackup</codeph> plugin configuration file, a
            YAML-formatted text file. The file contains configuration information for the plugin
            application that <codeph>gpbackup</codeph> uses during the backup operation.</pd>
          <pd>If you specify the <codeph>--plugin-config</codeph> option when you back up a
            database, you must specify this option with configuration information for a
            corresponding plugin application when you restore the database from the backup.</pd>
          <pd>You cannot combine this option with the option <codeph>--backup-dir</codeph>.</pd>
          <pd>For information about using storage plugin applications, see <xref
              href="../../admin_guide/managing/backup-plugins.html" format="html" scope="external">Using gpbackup Storage
              Plugins</xref>.</pd>
        </plentry>
        <plentry>
          <pt><b>--quiet</b></pt>
          <pd>Optional. Suppress all non-warning, non-error log messages.</pd>
        </plentry>
        <plentry>
          <pt><b>--single-data-file</b></pt>
          <pd>Optional. Create a single data file on each segment host for all tables backed up on
            that segment. By default, each <codeph>gpbackup</codeph> creates one compressed CSV file
            for each table that is backed up on the segment.
            <note>If you use the <codeph>--single-data-file</codeph> option to combine table backups
              into a single file per segment, you cannot set the <codeph>gprestore</codeph> option
                <codeph>--jobs</codeph> to a value higher than 1 to perform a parallel restore
              operation.</note></pd>
        </plentry>
        <plentry>
          <pt><b>--verbose</b></pt>
          <pd>Optional. Print verbose log messages.</pd>
        </plentry>
        <plentry>
          <pt><b>--version</b></pt>
          <pd>Optional. Print the version number and exit.</pd>
        </plentry>
        <plentry>
          <pt><b>--with-stats</b></pt>
          <pd>Optional. Include query plan statistics in the backup set.</pd>
        </plentry>
        <plentry>
          <pt><b>--without-globals</b></pt>
          <pd>Optional. Omit the global Greenplum Database system objects during backup.</pd>
        </plentry>
        <plentry>
          <pt>--help</pt>
          <pd>Displays the online help.</pd>
        </plentry>
      </parml>
    </section>
    <section id="return_codes">
      <title>Return Codes</title>
      <p>One of these codes is returned after <codeph>gpbackup</codeph> completes.<ul
          id="ul_hhb_sqp_n4">
          <li><b>0</b> – Backup completed with no problems.</li>
          <li><b>1</b> – Backup completed with non-fatal errors. See log file for more
            information.</li>
          <li><b>2</b> – Backup failed with a fatal error. See log file for more information.</li>
        </ul></p>
    </section>
    <section id="table_names">
      <title>Schema and Table Names</title>
      <p>When using the option <codeph>--include-table</codeph> or
          <codeph>--include-table-file</codeph> to filter backups, the schema or table names may
        contain upper-case characters, space ( ), newline (\n), (\t), or any of these special
        characters: </p>
      <p><codeph> ~ # $ % ^ &amp; * ( ) _ - + [ ] { } > &lt; \ | ; : / ? ! , " ' </codeph>
      </p>
      <p>For example:</p>
      <codeblock>public.foo"bar 
public.foo bar
public.foo\nbar</codeblock>
      <note>The <codeph>--include-table</codeph> and <codeph>--include-table-file</codeph> options
        do not support schema or table names that contain periods (<codeph>.</codeph>) or evaluated
        newlines. </note>
      <p>When the table name has special characters, the name must be enclosed in single
        quotes:<codeblock>gpbackup --dbname test --include-table 'my#1schema'.'my_$42_Table'</codeblock></p>
      <p>When the table name contains single quotes, use an escape character for each quote or
        encapsulate the table name within double quotes. For example:</p>
      <codeblock>
gpbackup --dbname test --include-table public.'foo\'bar'
gpbackup --dbname test --include-table public."foo'bar"</codeblock>
      <p>When using the option <codeph>--include-table-file</codeph>, the table names in the text
        file do not require single quotes. For example, the contents of the text file could be
        similar to:<codeblock>my#1schema.my_$42_Table
my#1schema.my_$590_Table</codeblock></p>
    </section>
    <section>
      <title>Examples</title>
      <p>Backup all schemas and tables in the "demo" database, including global Greenplum Database
        system objects statistics:<codeblock>$ gpbackup --dbname demo</codeblock></p>
      <p>Backup all schemas and tables in the "demo" database except for the "twitter"
        schema:<codeblock>$ gpbackup --dbname demo --exclude-schema twitter</codeblock></p>
      <p>Backup only the "twitter" schema in the "demo"
        database:<codeblock>$ gpbackup --dbname demo --include-schema twitter</codeblock></p>
      <p>Backup all schemas and tables in the "demo" database, including global Greenplum Database
        system objects and query statistics, and copy all backup files to the
          <filepath>/home/gpadmin/backup</filepath>
        directory:<codeblock>$ gpbackup --dbname demo --with-stats --backup-dir /home/gpadmin/backup</codeblock></p>
      <p>This example uses <codeph>--include-schema</codeph> with <codeph>--exclude-table</codeph>
        to back up a schema except for a single table. </p>
      <codeblock>$ gpbackup --dbname demo --include-schema mydata --exclude-table mydata.addresses</codeblock>
      <p>You cannot use the option <codeph>--exclude-schema</codeph> with a table filtering option
        such as <codeph>--include-table</codeph>.</p>
    </section>
    <section id="section9">
      <title>See Also</title>
      <p>
        <xref href="./gprestore.xml" type="topic" format="dita"/>, <xref
          href="../../admin_guide/managing/backup-gpbackup.html" format="html" scope="external"
          >Parallel Backup with gpbackup and gprestore</xref> and <xref
          href="../../admin_guide/managing/backup-s3-plugin.html" format="html" scope="external"
          >Using the S3 Storage Plugin with gpbackup and gprestore</xref></p>
    </section>
  </body>
</topic>
